package net.kleinhenz.norabase.shared.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Champion extends Rune implements Serializable {

	private static final long serialVersionUID = 1L;

    protected int maxrng;
    protected int minrng;
    protected int spd;
    protected int def;
    protected int dmg;
    protected int hp;
    protected String size;
    protected String classes;
    protected String races;
    protected List<Ability> startingAbilities = new ArrayList<Ability>();
    protected List<Ability> upgradeAbilities = new ArrayList<Ability>();

    public int getMaxrng() {
        return maxrng;
    }

    public void setMaxrng(int value) {
        this.maxrng = value;
    }

    public int getMinrng() {
        return minrng;
    }

    public void setMinrng(int value) {
        this.minrng = value;
    }

    public int getSpd() {
        return spd;
    }

    public void setSpd(int value) {
        this.spd = value;
    }

    public int getDef() {
        return def;
    }

    public void setDef(int value) {
        this.def = value;
    }

    public int getDmg() {
        return dmg;
    }

    public void setDmg(int value) {
        this.dmg = value;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int value) {
        this.hp = value;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String value) {
        this.size = value;
    }

    public String getClasses() {
        return classes;
    }

    public void setClasses(String value) {
        this.classes = value;
    }

    public String getRaces() {
        return races;
    }

    public void setRaces(String value) {
        this.races = value;
    }

    public List<Ability> getStartingAbilities() {
        return startingAbilities;
    }

    public String getStartingAbilitiesString() {
    	return serializeAbilities(getStartingAbilities());
    }

	public void setStartingAbilities(List<Ability> value) {
        this.startingAbilities = value;
    }

    public List<Ability> getUpgradeAbilities() {
    	return upgradeAbilities;
    }

    public String getUpgradeAbilitiesString() {
    	return serializeAbilities(getUpgradeAbilities());
    }

    public void setUpgradeAbilities(List<Ability> value) {
        this.upgradeAbilities = value;
    }

    private String serializeAbilities(List<Ability> abilities) {
    	StringBuffer buf = new StringBuffer();
    	for (Ability a : abilities) {
    		buf.append(a.name);
    		buf.append(" ");
    	}
    	return buf.toString();
	}
}
